import request from '@/utils/request';
import type { LoginFormRaw, LoginResRaw, UserInfoRaw } from '@/types/sys/auth';

export const loginApi = (data: LoginFormRaw): Promise<LoginResRaw> => {
  return request({
    url: '/auth/login',
    method: 'post',
    data
  });
};

export const getUserInfoApi = (): Promise<UserInfoRaw> => {
  return request({
    url: '/auth/getUserInfo',
    method: 'get'
  });
};
